Repository navigation
feat(smartqa-host): wait up to 10 s for the host recorder before a host run starts (CHE-1098 stage 4b) [squash] - #339
Open
congvc-bot-x99[bot] wants to merge 5 commits into
Conversation
added 4 commits
November 25, 2026 20:32
…st run starts (CHE-1098 stage 4b)
…ity ratchet (CHE-1098 stage 4b)
…HE-1098 stage 4b)
…et/che-9900-ffaa340249c5
…ssion repo a real lifecycle db_path (CHE-1098 stage 4b)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status
Draft. Server only. Code and tests only. No host (Go) change, no UI, no deploy.
Conditions
ARTEMIS_HOST_RECORDING. It is on only whenARTEMIS_HOST_AGENTis also on. Off means today's behavior.connectedsnapshot only. A liverecordingsmessage ships with stage 8, together with its Go handler.Change
artemis/config/host_agent.py:host_recording_enabled(), read on every call.task_queue_service.py_execute_task_item: for a run withtarget.host_idand a session id, with the flag on, beforeworker_spawnedis set:assign(host_id, session_id, generation).set_recording_state(..., capture="pending").wait_readyin a thread (10 s default).capture="recording". No signal givescapture="missing:not_ready"and the log lineevent=recorder_not_ready session_id=... host_id=.... The worker spawns in both cases.request_stop(session_id)after_persist_terminal_session_statusand in the spawn-failure path. A requeue does not stop it. A host NACK during the wait still requeues, and the next attemptassignreturns the same row.RecordingAssignment.server_started_atishost_started_at + clock_offsetwhen both are set, elseNone. Stage 6 writes it tovideo_recordings.start_time.Blast Radius
host_id, hosts, the WebSocket protocol, the database schema.recorder_not_readylog line;run_recording_state.capturereadsmissing:not_ready.Evidence
Test command:
uv run pytest tests/unit/admin_console -qRed, before the change (new tests only,
test_host_recording_wait.pyandtest_recording_assignments.py):Green, after the change:
The wait uses a fake clock and sleep in the store. No real 10 s wait.
Refs CHE-1087